package com.zhengke.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.zhengke.common.object.Result;
import com.zhengke.pojo.TjToday;
import com.zhengke.service.TjTodayService;
@Controller
public class TjTodayController {
	 /**
     * ssx
     * */ 
	@Autowired
	private TjTodayService service;
	
	
	@RequestMapping("XTGL054!toXtgl054.do")//跳转页面到查询
	public String query(){
		return "today/list";
	}
	
	//查询
	@RequestMapping("today/list.do")
    @ResponseBody
	public Result querys(){
    	Result rs = null;    	
    	try {
			 rs = service.queryTodays();
			return rs;
		} catch (Exception e) {
			e.printStackTrace();
		}  	
		return null;
	}
	
	
	
	    //跳转
	
	    @RequestMapping("todays/update.do")//到修改页面
	    public String update(){
		return "today/toGcUpd";
	    }
	
		@RequestMapping("todayss/update.do")
	    @ResponseBody
		public Result updates(TjToday today){
			
	    	Result rs = null;    	
	    	try {
				 rs = service.updateTodays(today);
				return rs;
			} catch (Exception e) {
				e.printStackTrace();
			}  	
			return null;
		}
	
	
	
}
